package com.lanou.pianke.articlecategory.service;

import com.lanou.pianke.articlecategory.entity.ACategory;
import com.lanou.pianke.articlecategory.mapper.CategoryMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CategoryService {

    @Autowired
    private CategoryMapper categoryMapper;

    public List<ACategory> selectCategory() {
        return categoryMapper.selectACtegory();
    }

    public Integer selectArticleCount(Integer acid){
        return categoryMapper.selectCategoryCount(acid);
    }

    public List<Integer> selectAcid(){
        return categoryMapper.selectAcid();
    }

    public void updateArticleCount(Integer acid,Integer articleCount) {
        categoryMapper.updateArticleCount(acid,articleCount);
    }
}
